<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="./js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="./js/jquery.form.js"></script>
    <script type="text/javascript" src="./js/template.js"></script>
    <title>登录</title>
</head>
<body>
<div id="infodiv">
</div>
<input type="button" id="test" value="111"/>
中文

<form id="uploadfr" action="/other/upload3" method="post" enctype="multipart/form-data">
    <input type="file" name="file"/>
    <!--<input type="text" name="param2" value="1" style="display: none"/>-->
    <button type="button" id="uploadbtn">upload</button>
</form>
<script type="text/javascript">
    $(function(){
        $("#test").click(function() {
            $.get("/other",{id:1},function (result) {
               $("#infodiv").html(result);
            },"json");
        });
    });
    $("#uploadbtn").click(function(){
        saveReport()
    });

    function saveReport() {
        $("#uploadfr").ajaxSubmit(function(result) {
            console.log(result+"1");
        }, function(result){
            console.log(result+"2");
        });
        return false;
//      $("#uploadfr").submit();
//        console.log($("#uploadfr").serialize());
//        $.post("/other/upload2",$('#uploadfr').serialize(),function(result){
//            console.log(result);
//        },"json");
    }
</script>
</body>
</html>